'''
定义一个登陆函数，参数是:ursename,password
函数体：判断参数传过来的username，password是否正确，如果正确则登陆成功，否则打印登陆失败
'''
def login(username,password):
    uname = 'admin'
    pwd = '123'
    for i in range(3):
        if username == uname and password == pwd:
            print('登陆成功！')
            break
        else:
            print('登陆失败！')
            username = input('请输入账户名:')
            password = input('请输入密码:')
    else:
        print('账号被锁定！')


username = input('请输入账户名:')
password = input('请输入密码:')
login(username,password)

#找出列表中的最大值
def max1(iterable):
    max = iterable[0]
    for i in iterable:
        if i > max:
           max = i
    print(max)

list1 = [2,8,4,5,3]
max1(list1)

tuple1 = (1,5,3,2)
max1(tuple1)

#判断是不是什么类型，isinstance(变量，类型关键字) 返回值为布尔值
print(isinstance(2,int))
print(isinstance(tuple1,tuple))